package com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.BusinessTravel;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;

import java.util.List;

/**
 * Created by yangsy on 2016/12/19.
 */
public interface BusinessTravelService {

    int deleteByPrimaryKey(String businessTravelId);

    int insert(BusinessTravel record);

    int insertSelective(BusinessTravel record, EmployeeVo employeeVo) throws Exception;

    BusinessTravel selectByPrimaryKey(String businessTravelId);

    int updateByPrimaryKeySelective(BusinessTravel record);

    int updateByPrimaryKey(BusinessTravel record);

    JSONObject list(BusinessTravel businessTravel);

    /**
     * 代办查找
     *
     * @param bootstrapSearchBean
     * @return
     */
    List<Object> searchByPIId(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 节点处理
     *
     * @param businessTravel
     * @return
     */
    int dispose(BusinessTravel businessTravel,EmployeeVo employeeVo);

    int sub(BusinessTravel businessTravel, String userName, String pwd);

    /**
     * 代办总条数
     *
     * @param bootstrapSearchBean
     * @return
     */
    int totalCountByPIId(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 查询我已经审批的
     *
     * @param businessTravel
     * @return
     */
    JSONObject processed(BusinessTravel businessTravel);

    /**
     * 查询我的出差待办
     */
    JSONObject listToDoTask(BusinessTravel businessTravel);
}
